package com.wjerp.tplus.server.common.model;

import com.wjerp.tplus.server.common.utils.RSAUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class LoginWrapper {
	private String username;
	private String password;
	private String loginType;

	public String getPassword() {
		if(password != null && !password.isEmpty()){
			try {
				password = new String(RSAUtils.decryptByPrivateKey(password));
			} catch (Exception e) {
				//e.printStackTrace();
			}
		}
		return password;
	}

}
